Skip to content

ci: add next to workflow branch filters - #1025

Merged
kvinwang merged 1 commit into
masterfrom
ci/add-next-branch-filters
Aug 7, 2026
Merged

ci: add next to workflow branch filters#1025
kvinwang merged 1 commit into
masterfrom
ci/add-next-branch-filters

Conversation

@kvinwang

@kvinwang kvinwang commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Problem

We are about to rename the default branch master -> next. Six of the eight workflows that filter on branch names already list next (branches: [ master, next, dev-* ]), so they keep working across the rename. Two do not:

  • .github/workflows/spdx-check.ymlbranches: [ master, main ]
  • .github/workflows/mkosi-build.ymlpush.branches: [master]

spdx-check.yml is the blocking one. It produces reuse-lint, which is one of the three required status checks in the merge-protection ruleset (alongside rust-checks and sdk-tests). GitHub retargets open PRs to the new default branch on rename, and pull_request.branches filters on the base branch — so the moment master becomes next, every one of the 18 currently-open PRs would stop matching this filter, reuse-lint would never be dispatched, and the required check would sit pending forever with no error surfaced anywhere. All 18 PRs become unmergeable.

Note the existing dev-* glob does not cover this: it requires the hyphen and does not match next, so next has to be listed explicitly.

mkosi-build.yml is not a required check and its pull_request trigger is filtered by paths only (no branch filter), so PR runs are unaffected. Only the post-merge push build on the mainline would silently stop firing.

Fix

Add next alongside master in both files. Keeping master means CI is correct both before and after the rename, so this can merge independently and the rename is not time-coupled to it. A follow-up PR drops master from all eight workflows once the rename has landed.

Also drop main from spdx-check.yml. This repo has no main branch — git ls-remote --heads origin main is empty and main appears in no other workflow — so the entry has never matched anything and only adds noise to the filter.

Verification

  • Both files parse and resolve to the intended triggers:
    • spdx-check.yml -> push.branches and pull_request.branches both [master, next]
    • mkosi-build.yml -> push.branches [master, next], tags [mkosi-os-v*] unchanged, pull_request still paths-only
  • Diff is 3 lines across 2 files; no job, step, or trigger type was added or removed.
  • Confirmed main does not exist on origin and is referenced by no other workflow.
  • Confirmed against the live ruleset that the required contexts are exactly sdk-tests, rust-checks, reuse-lint, and that all three rulesets target ~DEFAULT_BRANCH (so they follow the rename without manual edits).

Copilot AI lite review requested due to automatic review settings August 7, 2026 13:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates GitHub Actions workflow branch filters to keep CI running during the planned default-branch rename from master to next, avoiding workflows silently not dispatching due to on.push.branches / on.pull_request.branches base-branch filtering.

Changes:

  • Add next to the mkosi-build workflow push.branches filter.
  • Adjust the spdx-check workflow push.branches and pull_request.branches filters to include next (but currently drops main from the list, which conflicts with the PR description’s stated intent).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
.github/workflows/spdx-check.yml Updates push/PR branch filters for the required reuse-lint workflow to keep running after the default branch rename.
.github/workflows/mkosi-build.yml Updates the post-merge push branch filter to keep mainline mkosi builds running after the rename.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +9 to +11
branches: [ master, next ]
pull_request:
branches: [ master, main ]
branches: [ master, next ]
@kvinwang
kvinwang merged commit b2157fc into master Aug 7, 2026
18 checks passed
@kvinwang
kvinwang deleted the ci/add-next-branch-filters branch August 7, 2026 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants